home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / gnu / diff_2_1.lha / diff-2.1 / Makefile.in < prev    next >
Makefile  |  1993-02-01  |  5KB  |  154 lines

  1. # Makefile for GNU DIFF
  2. # Copyright (C) 1988, 1989, 1991, 1992 Free Software Foundation, Inc.
  3. #
  4. # This file is part of GNU DIFF.
  5. #
  6. # GNU DIFF is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. # GNU DIFF is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with GNU DIFF; see the file COPYING.  If not, write to
  16. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. #### Start of system configuration section. ####
  19.  
  20. srcdir = @srcdir@
  21. VPATH = @srcdir@
  22.  
  23. CC = @CC@
  24. INSTALL = @INSTALL@
  25. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  26. INSTALL_DATA = @INSTALL_DATA@
  27. MAKEINFO = makeinfo
  28.  
  29. # Things you might add to DEFS:
  30. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  31. # -DHAVE_UNISTD_H    If you have unistd.h.
  32. # -DHAVE_STRING_H    If you don't have ANSI C headers but have string.h.
  33. # -DDIRENT        If you have dirent.h.
  34. # -DSYSNDIR        Old Xenix systems (sys/ndir.h).
  35. # -DSYSDIR        Old BSD systems (sys/dir.h).
  36. # -DNDIR        Old System V systems (ndir.h).
  37. # -DHAVE_VFORK_H    If you have vfork and it needs vfork.h.
  38. # -DHAVE_DUP2        If you have dup2 system call.
  39. # -DHAVE_WAITPID    If you have waitpid system call.
  40. # -DHAVE_ST_BLKSIZE    If your struct stat has an st_blksize member.
  41. # -DHAVE_STRERROR    If you have strerror function.
  42. # -DHAVE_ALLOCA_H    If you have a working alloca.h.
  43.  
  44. DEFS = @DEFS@
  45.  
  46. CFLAGS = -g
  47. LDFLAGS = -g
  48. LIBS = @LIBS@
  49.  
  50. # Some System V machines do not come with libPW.
  51. # If this is true for you, use the GNU alloca.o here.
  52. ALLOCA = @ALLOCA@
  53.  
  54. prefix = /usr/local
  55. exec_prefix = $(prefix)
  56.  
  57. # Prefix for each installed program, normally empty or `g'.
  58. binprefix = 
  59.  
  60. bindir = $(exec_prefix)/bin
  61.  
  62. infodir = $(prefix)/info
  63.  
  64. #### End of system configuration section. ####
  65.  
  66. SHELL = /bin/sh
  67.  
  68. # The source files for all of the programs.
  69. srcs=diff.c analyze.c io.c context.c ed.c normal.c ifdef.c util.c dir.c \
  70.     version.c diff.h regex.c regex.h side.c system.h limits.h \
  71.     diff3.c sdiff.c cmp.c error.c xmalloc.c getopt.c getopt1.c getopt.h \
  72.     fnmatch.c fnmatch.h alloca.c
  73. # Object files for diff only.
  74. objs=diff.o analyze.o io.o context.o \
  75.      ed.o normal.o util.o dir.o fnmatch.o \
  76.      regex.o side.o ifdef.o version.o \
  77.      getopt.o getopt1.o $(ALLOCA)
  78. distfiles = $(srcs) README INSTALL NEWS diagmeet.note Makefile.in configure \
  79.     configure.in COPYING ChangeLog diff.texi diff.info* texinfo.tex
  80.  
  81. all: diff diff3 sdiff cmp diff.info
  82.  
  83. .c.o:
  84.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -I. $<
  85.  
  86. diff: $(objs)
  87.     $(CC) -o $@ $(LDFLAGS) $(objs) $(LIBS)
  88.  
  89. diff3: diff3.o getopt.o getopt1.o version.o $(ALLOCA)
  90.     $(CC) -o $@ $(LDFLAGS) diff3.o getopt.o getopt1.o version.o $(ALLOCA) $(LIBS)
  91.  
  92. sdiff: sdiff.o getopt.o getopt1.o version.o $(ALLOCA)
  93.     $(CC) -o $@ $(LDFLAGS) sdiff.o getopt.o getopt1.o version.o $(ALLOCA) $(LIBS)
  94.  
  95. cmp: cmp.o getopt.o getopt1.o error.o xmalloc.o $(ALLOCA)
  96.     $(CC) -o $@ $(LDFLAGS) cmp.o getopt.o getopt1.o error.o xmalloc.o $(ALLOCA) $(LIBS)
  97.  
  98. diff.info: diff.texi
  99.     $(MAKEINFO) $(srcdir)/diff.texi
  100.  
  101. $(objs): diff.h system.h
  102. cmp.o diff3.o sdiff.o: system.h
  103. context.o diff.o regex.o: regex.h
  104. cmp.o diff.o diff3.o sdiff.o getopt.o getopt1.o: getopt.h
  105. diff.o fnmatch.o: fnmatch.h
  106.  
  107. diff3.o: diff3.c
  108.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -DDIFF_PROGRAM=\"$(bindir)/$(binprefix)diff\" $(srcdir)/diff3.c
  109.  
  110. sdiff.o: sdiff.c
  111.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -DDIFF_PROGRAM=\"$(bindir)/$(binprefix)diff\" $(srcdir)/sdiff.c
  112.  
  113. TAGS: $(srcs)
  114.     etags $(srcs)
  115.  
  116. clean:
  117.     rm -f *.o diff diff3 sdiff cmp core
  118.  
  119. mostlyclean: clean
  120.  
  121. distclean: clean
  122.     rm -f Makefile config.status
  123.  
  124. realclean: distclean
  125.     rm -f TAGS *.info*
  126.  
  127. install: all
  128.     for p in diff diff3 sdiff cmp; \
  129.     do $(INSTALL_PROGRAM) $$p $(bindir)/$(binprefix)$$p; done
  130.     cd $(srcdir); for f in diff.info*; \
  131.     do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  132.  
  133. uninstall:
  134.     for p in diff diff3 sdiff cmp; \
  135.     do rm -f $(bindir)/$(binprefix)$$p; done
  136.     rm -f $(infodir)/diff.info*
  137.  
  138. dist: $(distfiles)
  139.     echo diff-`sed -e '/version_string/!d' -e 's/[^0-9]*\([0-9a-z.]*\).*/\1/' -e q version.c` > .fname
  140.     rm -rf `cat .fname`
  141.     mkdir `cat .fname`
  142.     -ln $(distfiles) `cat .fname`
  143.     for file in $(distfiles); do \
  144.       if [ ! -r `cat .fname`/$$file ]; then cp -p $$file `cat .fname`; fi \
  145.     done
  146.     tar chZf `cat .fname`.tar.Z `cat .fname`
  147.     tar chf - `cat .fname` | gzip > `cat .fname`.tar.z
  148.     rm -rf `cat .fname` .fname
  149.  
  150. # Prevent GNU make v3 from overflowing arg limit on SysV.
  151. .NOEXPORT:
  152.